import request from '@/utils/http'

const getListApi = (params) => {
  return request({
    method: 'get',
    url: 'api/course/list',
    params,
  })
}

const getDetailApi = (params) => {
  return request({
    method: 'get',
    url: 'api/course',
    params,
  })
}
const getTeacherListApi = () => {
  return request({
    method: 'get',
    url: 'api/course/teacherList',
  })
}

const addApi = (data, identity) => {
  return request({
    method: 'post',
    url: `api/course?identity=${identity}`,
    data,
  })
}
const deleteApi = (params) => {
  return request({
    method: 'delete',
    url: 'api/course',
    params,
  })
}
export { getListApi, getDetailApi, getTeacherListApi, addApi, deleteApi }
